package com.zqxq.lottery.api.feign;


import com.zqxq.common.constant.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClientsConfiguration;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.File;
import java.util.Map;


@FeignClient(value = "file-server", configuration = FeignClientsConfiguration.class)
public interface FileServerFeignClient {

    /**
     * 上传用户文件：上传到本地
     * @param fileMap
     * @return
     */
    @RequestMapping(value = "/file/saveUserFile", method = RequestMethod.POST)
    Result fileUpload(@RequestBody Map<String, File> fileMap, @RequestParam("fileName") String fileName, @RequestParam("appKey") String appKey, @RequestParam("path") String path, @RequestParam("pathType") String pathType);

}
